package com.qth.valet.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qth.valet.common.utils.ResponseResult;
import com.qth.valet.entity.po.CouponUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qth.valet.entity.vo.CouponUserVo;
import com.qth.valet.mapper.provider.UserCouponProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * <p>
 * 优惠券-用户-关系表 Mapper 接口
 * </p>
 *
 * @author 蔡徐坤
 * @since 2025-08-26
 */
public interface CouponUserMapper extends BaseMapper<CouponUser> {

    List<CouponUserVo> getMyCouponList(Integer id);

    Long getMyCouponCount(Integer id);

//    @SelectProvider(type = UserCouponProvider.class, method = "selectCouponByStatus")
    IPage<CouponUserVo> getMyCouponBySts(@Param("page") IPage<CouponUserVo> page, @Param("id") Integer id, @Param("status") Integer status);
}
